草庐IT

python - pip 安装 eyeD3 模块。找不到 libmagic

全部标签

ruby - 安装 RVM : "Requirements installation failed with status: 1."

这是我在命令提示符之前看到的最后一件事:Searchingforbinaryrubies,thismighttakesometime.Foundremotefilehttps://rvm.io/binaries/osx/10.9/x86_64/ruby-2.1.1.tar.bz2Checkingrequirementsforosx.AbouttoinstallHomebrew,press`Enter`fordefaultinstallationin`/usr/local`,typenewpathifyouwishcustomHomebrewinstallation(thepathnee

ruby - MacOS Sierra 上带有 RMagick 2.16 的 ImageMagick 7 找不到 MagickWand.h

我升级到imagemagick-7.0.4-3.sierra,现在我之前安装的RMagck2.16失败了。我检查了MagicWand:$find/usr/local-nameMagickWand.h/usr/local/Cellar/imagemagick/7.0.4-3/include/ImageMagick-7/MagickWand/MagickWand.h所以它似乎在那里。我还重新安装并重新链接了pgk-config。也没有帮助。有任何想法吗? 最佳答案 我刚刚在运行Sierra的新Mac上遇到并解决了这个问题。目前似乎没有针

ruby-on-rails - Elastic Beanstalk Ruby/Rails 需要安装 git 所以 bundle install 可以工作..但不是

我在部署我们的Rails应用程序时遇到问题。我创建了一个类似于AWS博客howto上示例的Hookhttp://ruby.awsblog.com/post/Tx2AK2MFX0QHRIO/Deploying-Ruby-Applications-to-AWS-Elastic-Beanstalk-with-Git喜欢:packages:yum:git:[]甚至我运行一个bundle来创建vendor/cache以将所有gems都放在那里......并且仍然得到:git://github.com/refinery/refinerycms-search.git(在2-0-stable)未che

ruby - 如何使用 yardoc 列出未记录的模块/类/常量/方法?

我有一个小型代码库,我正在用YARD记录这些代码.当我运行yardoc命令时,它告诉我:Files:40Modules:14(0undocumented)Classes:39(0undocumented)Constants:21(4undocumented)Methods:239(31undocumented)88.82%documented与其费力地遍历我的所有代码来查找未记录的常量和方法,我希望它简单地列出未记录的项目。有人知道怎么做吗? 最佳答案 您可以使用--list-undoc选项专门列出所有未记录的对象(及其文件位置)。

Ruby:模块、要求和包含

我正在尝试使用Ruby模块(mixins)。我有test.rb:#!/usr/bin/envrubyrequire_relative'lib/mymodule'classMyAppincludeMyModuleself.halloend和lib/mymodule.rb:moduleMyModuledefhalloputs"hallo"endend设置非常简单。但它不起作用:(:rubytest.rbtest.rb:8:in`':undefinedmethod`hallo'forMyApp:Class(NoMethodError)fromtest.rb:6:in`'我的错误在哪里?

ruby - Bundler 无法与 rbenv 一起工作,找不到 [gem]

我刚刚从rvm切换到rbenv,我正在尝试使用bundler进行gem管理。在运行bundleinstall并尝试运行一个简单的sinatra应用程序(rubyapp.rb)之后,我得到了这个:Couldnotfindhaml-3.1.4inanyofthesourcesRun`bundleinstall`toinstallmissinggems.再次运行bundleinstall没有效果。还按照另一个问题回复的建议尝试了bundleupdate。这是我的Gemfile:source"http://rubygems.org"gem"sinatra"gem"haml"这就是bundles

ruby - 如何通过反射获取 Ruby 模块类定义的常量?

我试图让Matz和Flanagan的“Ruby编程语言”元编程章节进入我的脑海,但是我无法理解我梦寐以求的以下代码片段的输出:pModule.constants.length#=>88$snapshot1=Module.constantsclassANAME=:abc$snapshot2=Module.constantsp$snapshot2.length#=>90p$snapshot2-$snapshot1#=>["A","NAME"]endpModule.constants.length#=>89pModule.constants-$snapshot1#=>["A"]pA.cons

ruby - 在现有的 Jekyll 安装中切换主题

Jekyll有很多主题,例如https://github.com/jekyll/jekyll/wiki/Themes.在现有的Jekyll安装中切换到新主题的最简单方法是什么? 最佳答案 这是我为更改现有Jekyll安装的主题所做的。调整这些说明以满足您的需要。拉新主题我们创建一个新的孤立分支newtheme并确保它是空的。gitcheckout--orphannewthemegitrm-rf.gitclean-dfx然后我们通过将主题添加为上游远程来将主题文件拉入其中。在此示例中,我拉取了JohnOtander的Pixyll主题的

ruby-on-rails - ruby 2.0 rails gem 安装错误 "cannot load such file -- openssl"

我正在使用osx10.8.2安装了ruby2.0并且....尝试运行"sudogeminstallrails"时得到这个$sudogeminstallrailsERROR:Loadingcommand:install(LoadError)cannotloadsuchfile--opensslERROR:Whileexecutinggem...(NoMethodError)undefinedmethod`invoke_with_build_args'fornil:NilClass我之前使用ruby​​1.9.x和rails3.2.x工作正常 最佳答案

ruby-on-rails - Gem.source_index 已弃用,请使用 Specification。我应该重新安装 Gem 还是 Rails?

我正在Ubuntu11上学习RoR。当我尝试生成应用程序时收到以下消息。我是不是安装错了什么?$railsgeneratecontrollerPageshomecontactNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:3.NOTE:Gem.source_indexi